-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: trip vs shape distance validation #1553
Conversation
@emmambd could you confirm what fields should be present in the notice's details? |
❌ Invalid acceptance test. |
@cka-y List of fields is correct! This is enough to cross reference the error and find what the problem is. |
❌ Invalid acceptance test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After doing some spot checks and looking at the report, this looks good to me! Noting that the acceptance tests generate errors for 7% of feeds in the Mobility Database which is above the recommended threshold, but this rule does align with the community consensus from https://github.com/google/transit/pull/380/files. @cka-y One question, not a blocker: any obvious reason why the list of feeds in the acceptance report is slightly different from the one in the original Python analysis report?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nicely done!
import org.mobilitydata.gtfsvalidator.table.*; | ||
|
||
@RunWith(JUnit4.class) | ||
public class TripAndShapeDistanceValidatorTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition!
@emmambd seems like the script was using the producer URL i.e. current version of the dataset as opposed to the action that uses a persisted version of the dataset. I'm going to keep an eye on this but I think it's safe to merge atm. |
Summary:
Created
trip_distance_exceeds_shape_distance
notice when the max valueshapeDistTraveled
of a trip is greater than the max value ofshapeDistTraveled
for its associated shape.Closes #163
Expected behavior:
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything